<?php

namespace frontend\models;

use Yii;

/**
 * This is the model class for table "tba_memberinforecordinfo".
 *
 * @property integer $ID
 * @property string $username
 * @property string $PayAccountNo
 * @property string $PayBank
 * @property string $RecAccountNo
 * @property string $RecBank
 * @property string $Remark
 * @property double $TotalMoney
 * @property string $SupplyTime
 *
 * @property TbaMemberinfo $iD
 */
class TbaMemberinforecordinfo extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'tba_memberinforecordinfo';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['ID'], 'integer'],
            [['TotalMoney', 'SupplyTime'], 'required'],
            [['TotalMoney'], 'number'],
            [['SupplyTime'], 'safe'],
            [['username'], 'string', 'max' => 20],
            [['PayAccountNo', 'RecAccountNo'], 'string', 'max' => 19],
            [['PayBank', 'RecBank', 'Remark'], 'string', 'max' => 50]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'ID' => 'ID',
            'username' => 'Username',
            'PayAccountNo' => 'Pay Account No',
            'PayBank' => 'Pay Bank',
            'RecAccountNo' => 'Rec Account No',
            'RecBank' => 'Rec Bank',
            'Remark' => 'Remark',
            'TotalMoney' => 'Total Money',
            'SupplyTime' => 'Supply Time',
        ];
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getID()
    {
        return $this->hasOne(TbaMemberinfo::className(), ['ID' => 'ID', 'UserName' => 'UserName']);
    }
}
